from nautobot.core.apps import (
    NavMenuAddButton,
    NavMenuGroup,
    NavMenuItem,
    NavMenuTab,
)
from nautobot.core.ui.choices import NavigationIconChoices, NavigationWeightChoices

menu_items = (
    NavMenuTab(
        name="Circuits",
        icon=NavigationIconChoices.CIRCUITS,
        weight=NavigationWeightChoices.CIRCUITS,
        groups=(
            NavMenuGroup(
                name="Circuits",
                weight=100,
                items=(
                    NavMenuItem(
                        link="circuits:circuit_list",
                        name="Circuits",
                        weight=100,
                        permissions=[
                            "circuits.view_circuit",
                        ],
                        buttons=(
                            NavMenuAddButton(
                                link="circuits:circuit_add",
                                permissions=[
                                    "circuits.add_circuit",
                                ],
                            ),
                        ),
                    ),
                    NavMenuItem(
                        link="circuits:circuittermination_list",
                        name="Circuit Terminations",
                        weight=200,
                        permissions=[
                            "circuits.view_circuittermination",
                        ],
                    ),
                    NavMenuItem(
                        link="circuits:circuittype_list",
                        name="Circuit Types",
                        weight=300,
                        permissions=[
                            "circuits.view_circuittype",
                        ],
                        buttons=(
                            NavMenuAddButton(
                                link="circuits:circuittype_add",
                                permissions=[
                                    "circuits.add_circuittype",
                                ],
                            ),
                        ),
                    ),
                ),
            ),
            NavMenuGroup(
                name="Providers",
                weight=200,
                items=(
                    NavMenuItem(
                        link="circuits:provider_list",
                        name="Providers",
                        weight=100,
                        permissions=[
                            "circuits.view_provider",
                        ],
                        buttons=(
                            NavMenuAddButton(
                                link="circuits:provider_add",
                                permissions=[
                                    "circuits.add_provider",
                                ],
                            ),
                        ),
                    ),
                    NavMenuItem(
                        link="circuits:providernetwork_list",
                        name="Provider Networks",
                        weight=200,
                        permissions=[
                            "circuits.view_providernetwork",
                        ],
                        buttons=(
                            NavMenuAddButton(
                                link="circuits:providernetwork_add",
                                permissions=[
                                    "circuits.add_providernetwork",
                                ],
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ),
)
